package com.shop.zkmall.app.im.core;



import com.shop.zkmall.app.im.TxImTemplate;
import com.shop.zkmall.app.im.core.properties.TxImProperties;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * IM配置类
 *
 * @author heike
 */

@Configuration
public class TxImConfig {

    @Configuration
    @ConditionalOnClass(com.tencentyun.TLSSigAPIv2.class)
    static class TxConfig {
        @Bean
        public TxImTemplate txImTemplate(TxImProperties txImProperties) {
            return new TxImTemplate(txImProperties);
        }
    }
}
